import request from '@/utils/request'

/**
 * 分页
 */
export function pagingSupplierCategory(query) {
  return request({
    url: '/user/villageSupplierCategory/paging',
    method: 'get',
    params: query
  })
}

// 获取分类列表
export function listSupplierCategory(query) {
  return request({
    url: '/user/villageSupplierCategory/listByEnterpriseId',
    method: 'get',
    params: query
  })
}

/**
 * 保存
 */
export function saveSupplierCategory(data) {
  return request({
    url: '/user/villageSupplierCategory/save',
    method: 'post',
    data: data
  })
}

/**
 * 删除
 */
export function deleteSupplierCategory(categoryId) {
  return request({
    url: '/user/villageSupplierCategory/delete',
    method: 'post',
    params: { categoryId }
  })
}
